home *** CD-ROM | disk | FTP | other *** search
/ Atari Mega Archive 1 / Atari Mega Archive - Volume 1.iso / lists / mint / l_0399 / 18 < prev    next >
Internet Message Format  |  1994-08-27  |  3KB

  1. Date:         Sun, 17 Jan 93 20:16:34 MST
  2. From: Michal Jaegermann <NTOMCZAK@vm.ucs.UAlberta.CA>
  3. Subject:      Re: libraries
  4. To: mint@terminator.rs.itd.umich.edu
  5.  
  6.  
  7. I think that splitting header files AND libraries into common,
  8. MiNT specific and TOS specific is something which should have been
  9. done a long time ago.  Actually Jwahar, Eric and me we were talking
  10. about that some while ago but there is quite a bit of work involved
  11. in it.  Maybe you noticed that for some while Jwahar was moving
  12. quietly in this direction.
  13.  
  14. Still, in my opinion, a requirement for something like an explicit
  15. #include <tos/foo.h> would be a mistake which will cause immediate
  16. compatibility headaches, neccessity to edit sources, lotsa of
  17. superfluous #ifdef...#endif and the like.
  18.  
  19. I think that instead we should modify a little bit an organization
  20. and a compiler driver.  Let us assume that we have two different files
  21. .../include/tos/stdio.h and .../include/mint/stdio.h.  In sources
  22. one should have one, unequivocal, directive '#include <stdio.h>'.
  23. A compiler driver (like gcc, for example) with a flag '-tos' should
  24. search for header files like this:
  25.   .../include/tos/,.../include, <whatever else in include path>
  26. and with '-mint' flag like this:
  27.   .../include/mint/,.../include, <whatever else in include path>
  28. with a similar arrangement for libraries.  One of flags '-mint' '-tos'
  29. could/should be a default depending on a compiler configuration.
  30. You risk that way at most a neccessity to recompile a driver, which
  31. is really small program and can be redone even on the smallest
  32. machines.  So what are your comments?
  33.  
  34. I think also that LF vs. CR/LF controversy is based on a
  35. misunderstanding.  Maybe I got it wrong, but I thought that an
  36. original proposition was about a form in which sources and updates are
  37. distributed.  It is true that 'patch' will barf on you (although
  38. 'patch -l' should be ok, but it may other undesirable side effects) if
  39. you have sources in one form and diffs in another but they are easily
  40. convertible one way or another and there is likely 1001 ways to
  41. acomplish that conversion.  Jwahar is using LF line terminator since
  42. he keeps and maintains library sources on a Unix machine for the sake
  43. of convenience but this does not mean that anybody else have to do
  44. the same thing.  (Sending them via zmodem in an unpacked form as
  45. text files will do that conversion for you - both ways :-)).
  46.  
  47. Julian asks why DTA is named _DTA in gcc header files.  I can guess
  48. that this was done to be consistent with a convention that
  49. internal "vendor names" start with '_' to avoid a polution of a name
  50. space.  If Pure C needs DTA instead this is easy to resolve by
  51. supplying in a "compatibility" header file "#define DTA _DTA".
  52. As for conflicts in prototypes I really cannot tell.  I have never
  53. seen Pure C compiler and I do not know where conflicts do occure.
  54. I can only tell that gcc headers try very hard to follow ANSI C
  55. Standard and comparing with other "more or less" Standard C compilers
  56. on other machines are pretty good at it.
  57.  
  58.    Michal
  59.